package org.rambadger.command;

import com.google.common.collect.ImmutableMultimap;
import com.yammer.dropwizard.tasks.Task;
import org.rambadger.command.axon.AxonBundle;

import java.io.PrintWriter;

class RebuildTask extends Task {
    AxonBundle axon;
    public RebuildTask(AxonBundle axon) {
        super("rebuild");
        this.axon = axon;
    }

    @Override
    public void execute(ImmutableMultimap<String, String> parameters, PrintWriter output) throws Exception {
        axon.getReplayingCluster().startReplay();
    }
}
